package com.shop.mapper;

import com.shop.model.dto.ScheduleLog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

/**
 * @author : WanS
 * @date : 12:05 2020/11/23
 */
@Mapper
public interface InFormMapper{

    @Select("select id from job where job_class_name=#{name}")
    int getScheduleId(String name);

    @Insert("insert into schedule_log(job_id,start_time,end_time,intervals,status,msg)" +
            "values(#{jobId},#{startTime},#{endTime},#{intervals},#{status},#{msg})")
    void addScheduleLog(ScheduleLog scheduleLog);
}
